<template>

    <iframe  :src="url" frameborder="0" width="100%" height="800px" scrolling="auto"></iframe>

</template>

<script>


  export default {
    name: "IframePageRouter",
    
    data () {
      return {
        url: "",
        id:""
      }
    },
    created () {
      this.goUrl()
    },
    updated () {
      this.goUrl()
    },
    watch: {
      $route(to, from) {
        this.goUrl();
      }
    },
    methods: {
      goUrl () {
      let url = Object.values(this.$route.query)[0]
      let parameter=Object.keys(this.$route.query)[1]
      let id=Object.values(this.$route.query)[1]
      this.url = url+"&"+parameter+"="+id;
      this.$route.meta.title = this.$route.query.title
      }
    }
  }
</script>

<style>
</style>